Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a custom List on PublicSuffix.parse #26

Merged
merged 1 commit into from Dec 24, 2012
Merged

Allow a custom List on PublicSuffix.parse #26

merged 1 commit into from Dec 24, 2012

Conversation

itspriddle
Copy link
Contributor

I needed a way to allow ".test" as a valid TLD when using PublicSufffix.parse. Currently, the only way to do that is to add a custom rule to the default list.

This patch allows one to pass in a custom list when using PublicSuffix.parse. This way the default list can remain unchanged; eg:

list = PublicSuffix::List.new
list << PublicSuffix::Rule.factory("test")

PublicSuffix.parse("example.test", list)
#=> example.test

@ghost ghost assigned weppos Dec 24, 2012
@weppos
Copy link
Owner

weppos commented Dec 24, 2012

I like it! Thanks. 👍

weppos added a commit that referenced this pull request Dec 24, 2012
Allow a custom List on `PublicSuffix.parse`
@weppos weppos merged commit d2f1e77 into weppos:master Dec 24, 2012
weppos added a commit that referenced this pull request Dec 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants